<!-- 选项卡配置 -->
<template>
  <div style="margin-top:16px">
    <el-form-item :label="$t('字体')" class="form_item_margin">
          <span class="l_color_box r_margin_right8">
            <l-input-color
              v-model="myConfig.color"
              :notInput="true"
            ></l-input-color>
          </span>
          <el-input
            v-model="myConfig.color"
            class="r_96width r_margin_right8"
          >
          </el-input>
          <el-input
            v-model="myConfig.fontSize"
            class="r_56width"
            oninput="value=value.replace(/[^\d]/g,'')"
          >
            <span slot="suffix" style="line-height: 32px">px</span>
          </el-input>
        </el-form-item>
    <!--<el-form-item label="类型">
      <l-radio v-model="myConfig.type"
                  :options="dicOption.tabsTypeList"></l-radio>
    </el-form-item>-->
    <template v-if="myConfig.type==='tabs'">
      <el-form-item label="字体间距">
        <el-input-number v-model="myConfig.split" controls-position="right"></el-input-number>
      </el-form-item>
      <hr class="hr_color" style="margin-bottom: 2px" />
      <el-collapse accordion>
        <el-collapse-item title="边框设置">
          <el-form-item label="背景颜色" class="form_item_margin">
           <span class="l_color_box r_margin_right8">
            <l-input-color
              v-model="myConfig.backgroundColor"
              :notInput="true"
            ></l-input-color>
          </span>
          <el-input
            v-model="myConfig.backgroundColor"
            class="r_160width"
          ></el-input>
        </el-form-item>
          <el-form-item label="图标间距">
            <el-input-number v-model="myConfig.iconSplit" controls-position="right"></el-input-number>
          </el-form-item>
          <el-form-item label="图标大小">
            <el-input-number v-model="myConfig.iconSize" controls-position="right" ></el-input-number>
          </el-form-item>
          <el-form-item label="图片地址">
            <l-img-select v-model="myConfig.backgroundImage" />
          </el-form-item>
          <el-form-item :label="$t('边框')" class="form_item_margin">
            <span class="l_color_box r_margin_right8">
              <l-input-color
                v-model="myConfig.borderColor"
                :notInput="true"
              ></l-input-color>
            </span>
            <el-input
              v-model="myConfig.borderColor"
              class="r_96width r_margin_right8"
            >
            </el-input>
            <el-input
              v-model="myConfig.borderWidth"
              class="r_56width"
              oninput="value=value.replace(/[^\d]/g,'')"
            >
              <span slot="suffix" style="line-height: 32px">px</span>
            </el-input>
          </el-form-item>
        </el-collapse-item>
        <el-collapse-item title="高亮设置">
          <el-form-item label="字体高亮">
            <span class="l_color_box r_margin_right8">
            <l-input-color
              v-model="myConfig.empColor"
              :notInput="true"
            ></l-input-color>
          </span>
          <el-input
            v-model="myConfig.empColor"
            class="r_160width"
          ></el-input>
          </el-form-item>
          <el-form-item label="背景图片">
            <l-img-select v-model="myConfig.empBackgroundImage" />
          </el-form-item>
          <el-form-item :label="$t('边框')" class="form_item_margin">
            <span class="l_color_box r_margin_right8">
              <l-input-color
                v-model="myConfig.empBorderColor"
                :notInput="true"
              ></l-input-color>
            </span>
            <el-input
              v-model="myConfig.empBorderColor"
              class="r_96width r_margin_right8"
            >
            </el-input>
            <el-input
              v-model="myConfig.empBorderWidth"
              class="r_56width"
              oninput="value=value.replace(/[^\d]/g,'')"
            >
              <span slot="suffix" style="line-height: 32px">px</span>
            </el-input>
          </el-form-item>
        </el-collapse-item>
      </el-collapse>
    </template>
  </div>
</template>

<script>
import { dicOption } from "../../mixins/config";
export default {
  data () {
    return {
      dicOption: dicOption
    }
  },
  inject: ["main"],
  props: {
    config: {
      type: Object,
      default: () => ({}),
    },
  },
  computed: {
    myConfig() {
      return this.config;
    },
  },
}
</script>

<style>
</style>